<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="myDiv">Click Me</div>
<script>
    /*
        div#myDiv{Click Me}
    /*
        冒泡:
            - 从下至上
                - div -> body -> html -> document
     */
    
    /*
        举例
            - 打印顺序
                - div
                - body
                - html
                - document
     */
    const theDom = document.querySelector('#myDiv')
    theDom.addEventListener('click',() =>console.log('div'))
    document.body.addEventListener('click',() =>console.log('body'))
    document.querySelector('html').addEventListener('click',() =>console.log('html'))
    document.addEventListener('click',() =>console.log('document'))
    
</script>
</body>
</html>